#include "ThreadPool.hpp"
#include <memory>
#include <unistd.h>
#include "Task.hpp"

int main()
{
    std::unique_ptr<ThreadPool<Task>> tp(new ThreadPool<Task>());
    tp->run();

    int x,y;
    char op;
    while(1)
    {
        std::cout << "请输入数据"  << std::endl;
        std::cin >> x;
        std::cout << "请输入数据2"  << std::endl;
        std::cin >> y;
        std::cout << "请输入你需要进行的运算" << std::endl;
        std::cin >> op;
        
        Task t(x, y,op,mymath);
        std::cout << "你刚刚录入了一个任务" << t.toTaskString() << std::endl;
        tp->push(t);
        sleep(1);
    }
    return 0;
}